﻿using Microsoft.Practices.Unity.Configuration;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity;

namespace TalksLog.Unities
{
    public static class IocContainer
    {
        static IocContainer()
        {
            DefaultContainer = new UnityContainer();//创建容器
            UnityConfigurationSection configuration = (UnityConfigurationSection)ConfigurationManager.GetSection(UnityConfigurationSection.SectionName);
            configuration.Configure(DefaultContainer, "defaultContainer");
        }

        public static UnityContainer DefaultContainer { get; }
    }
}
